import 'package:get/get.dart';
import 'package:xinxuan/http/http_util_service.dart';
import 'package:xinxuan/vo/blindbox/blind_box_order_detail_vo.dart';

class BlindBoxPrizePageController extends GetxController {

  var blindBoxOrderDetailData = BlindBoxOrderDetailData(id: 0).obs;

  int id = 0;
  
  @override
  void onInit() {
    Map<String, dynamic> argumentsMap = Get.arguments;
    id = argumentsMap['id'];
    getBlindBoxOrderDetail();
    super.onInit();
  }

  /// 获取订单详情
  getBlindBoxOrderDetail() async {
    BlindBoxOrderDetailVo vo =  await HttpUtilService.getBlindBoxOrderDetail(orderId: id);
    blindBoxOrderDetailData.value = vo.data!;
    update();
  }

}